package com.situ.mall.pattern.observer1;

public class Reader implements Observer {
    private String name;

    public Reader(String name) {
        this.name = name;
    }

    @Override
    public void update(Subject subject) {
        NewsPaper newsPaper = (NewsPaper) subject;
        System.out.println(name + "收到报纸，本期内容：" + newsPaper.getContent());
    }
}
